Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc debian 10 updates #11488

Merged
merged 9 commits into from Jun 6, 2020
Merged

Conversation

robje
Copy link
Contributor

@robje robje commented Apr 26, 2020

Some (Debian specific) updates to the Debian 10 installation procedure.

DO NOT DELETE THE UNDERLYING TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

  • Have you followed our code guidelines?
  • If my Pull Request does some changes/fixes/enhancements in the WebUI, I have inserted a screenshot of it.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926
After you are done testing, you can remove the changes with ./scripts/github-remove. If there are schema changes, you can ask on discord how to revert.

There are ways to install debian without the acl package. Add it to the
required list
Debian does not require systemd. This makes calling systemctl to restart
processes a problem. The more generic way in Debian is to call service
In Debian webservers are configured using -available and -enabled
directories. Make better use of this stucture.
Instead of overwriting snmpd.conf inform Debian of the change.

Because snmpd.conf contains sensitive info make it only user accessible
@SourceDoctor
Copy link
Member

some questions:

  • changing from nano to editor? why?
  • chmod on /etc/snmp/snmpd.conf why?
  • what do you want to do with dpkg-divert --rename /etc/snmp/snmpd.conf
  • nginx configuration -> as i know it's a *.conf not a *.vhost
  • why remove this line: rm /etc/nginx/sites-available/default && rm /etc/nginx/sites-enabled/default

@SourceDoctor SourceDoctor added the User-Pending Currently waiting for user response label Apr 26, 2020
@robje
Copy link
Contributor Author

robje commented Apr 26, 2020

some questions:

apparently I need more git school. I thought I answered most of these questions in the commit messages. Apparently my additional lines went missing.

* changing from nano to editor? why?

Debian has the command editor which is the users preferred editor. It can be nano or emacs or vim or something different.
Using editor here also better indicates the user is free to chose an editor.

* chmod on /etc/snmp/snmpd.conf  why?

snmpd.conf holds (can hold) sensitive information like community stings and passwords.
This is why the file by default is mode 600 on installation. The chmod is to restore this after copying the librenms version.

* what do you want to do with dpkg-divert --rename /etc/snmp/snmpd.conf

This is to let the package manager know this file is now managed in an other way than through the package manager.
It results in less user interaction on upgrades.

* nginx configuration -> as i know it's a *.conf not a *.vhost

This was not changed. The file was called *.vhost already. And it works as the include is *

include /etc/nginx/sites-enabled/*;
* why remove this line: rm /etc/nginx/sites-available/default && rm /etc/nginx/sites-enabled/default

This line is not removed.
I've updated it to remove the sites-enabled file only. That way the package manager can still manage the sites-available version.

@SourceDoctor
Copy link
Member

SourceDoctor commented Apr 26, 2020

changing editor from nano to editor
may be good, but i would it keep on nano, or change it to editor on all debian/ubuntu system documentations, but this should be a separate PR

snmpd chmod
if you do it, you have to be ensure file is owned bei snmpd process.
So a chown with user and group is missing

dpkg-divert
not exists on any documentations i've ever seen, also not here.
To avoid user confusion i would keep it away

@SourceDoctor
Copy link
Member

@robje something new about it?

@murrant
Copy link
Member

murrant commented May 8, 2020

@robje maybe a note about editor. So people don't get stuck in vim ;D

Also, this needs merging with upstream.

@SourceDoctor SourceDoctor reopened this Jun 6, 2020
@SourceDoctor
Copy link
Member

something new here?

@robje
Copy link
Contributor Author

robje commented Jun 6, 2020

@robje maybe a note about editor. So people don't get stuck in vim ;D

AFAIK nano is the default editor in Debian, no worries about getting stuck in vim unless one really wants to :)

Also, this needs merging with upstream.

  • done

@robje
Copy link
Contributor Author

robje commented Jun 6, 2020

changing editor from nano to editor
may be good, but i would it keep on nano, or change it to editor on all debian/ubuntu system documentations, but this should be a separate PR

agreed

snmpd chmod
if you do it, you have to be ensure file is owned bei snmpd process.
So a chown with user and group is missing

snmpd.conf is read before dropping privileges. On a new installation it is owned by root.

dpkg-divert
not exists on any documentations i've ever seen, also not here.
To avoid user confusion i would keep it away

Will put this forward in a separate pull request

```

# Configure snmpd

```bash
cp /opt/librenms/snmpd.conf.example /etc/snmp/snmpd.conf
chmod 600 /etc/snmp/snmpd.conf
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you change mod to 600 ... doesn't work if snmpd.conf is not owned by snmpd user

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you limit access such high a chown is also needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not. snmpd is started as root and privileges are dropped after starting. snmpd must be started as root to acquire privileged port 161.

snmpd.conf is read as root, before dropping privileges.

@SourceDoctor SourceDoctor self-requested a review June 6, 2020 16:43
@SourceDoctor SourceDoctor removed the User-Pending Currently waiting for user response label Jun 6, 2020
Copy link
Member

@SourceDoctor SourceDoctor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SourceDoctor SourceDoctor merged commit f590e63 into librenms:master Jun 6, 2020
@robje robje deleted the doc-debian-10-updates branch June 6, 2020 16:45
@murrant
Copy link
Member

murrant commented Jul 3, 2020

This pull request has been mentioned on LibreNMS Community. There might be relevant details there:

https://community.librenms.org/t/v1-65-release-changelog-june-2020/12687/1

1 similar comment
@murrant
Copy link
Member

murrant commented Jul 3, 2020

This pull request has been mentioned on LibreNMS Community. There might be relevant details there:

https://community.librenms.org/t/v1-65-release-changelog-june-2020/12687/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants